package com.hanamaki.basic.method;

import java.util.Scanner;

public class Demo11 {

    public static void main(String[] args) {
        printInfo();
    }
//    方法的定义
//    修饰符 返回值类型 方法名(参数列表){
//      方法体
//    }

    public static void printInfo() {
        System.out.println("请输入行高");
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        System.out.println("请输入打印的字符");
//        next   nextLine
        String next = scanner.next();
// line代表行高
        for (int j = 1; j <= i; j++) {
            for (int l = 1; l <= j; l++) {
                System.out.print(next);
            }
            System.out.println();
        }
    }
}

